/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package com.pancho;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class PacientCriteria extends AbstractORMCriteria {
	public final IntegerExpression idPaciente;
	public final StringExpression RUT;
	public final StringExpression nombre;
	public final StringExpression apellidos;
	public final StringExpression cellPhone;
	
	public PacientCriteria(Criteria criteria) {
		super(criteria);
		idPaciente = new IntegerExpression("idPaciente", this);
		RUT = new StringExpression("RUT", this);
		nombre = new StringExpression("nombre", this);
		apellidos = new StringExpression("apellidos", this);
		cellPhone = new StringExpression("cellPhone", this);
	}
	
	public PacientCriteria(PersistentSession session) {
		this(session.createCriteria(Pacient.class));
	}
	
	public PacientCriteria() throws PersistentException {
		this(com.pancho.Taller1PDSPersistentManager.instance().getSession());
	}
	
	public DiagnoseCriteria createDiagnoseCriteria() {
		return new DiagnoseCriteria(createCriteria("diagnose"));
	}
	
	public ResponseCriteria createResponseCriteria() {
		return new ResponseCriteria(createCriteria("response"));
	}
	
	public Pacient uniquePacient() {
		return (Pacient) super.uniqueResult();
	}
	
	public Pacient[] listPacient() {
		java.util.List list = super.list();
		return (Pacient[]) list.toArray(new Pacient[list.size()]);
	}
}

